{include file="header.html"}  
<style>
.s-items .iconfont{font-size:12px;}
.s-items .iconfont.active{color:orangered}
</style>  
<div class="mb-head">
    <a href="javascript:history.back(-1)" class="l_b"></a>
    <!--<div class="tit">产品搜索</div>-->
    <div class="search">
        <div class="search-box">
            <form>
                <input type="hidden" name="app" value="search"/>
                <input type="hidden" name="act" value="index"/>
                <input type="text" name="keyword"  value="" placeholder="{$lang.Search_products}" class="keyword" />
                <input type="submit" class="search-btn" value="" />
            </form>
        </div>
    </div>
    <a href="{url app=category}" class="r_b icon-cat">{$lang.category}</a>
</div>

<script type="text/javascript" src="{res file=js/search_goods.js}" charset="utf-8"></script>
<script>
    $(function () {
	var order = '{$smarty.get.order|default:default asc}';
	order_arr = order.split(' ');
	$( '#'+order_arr[0]+' .iconfont').addClass('active');
	switch (order_arr[1]){
		case 'desc' :
			$( '#'+order_arr[0]+' .iconfont').html("&#Xf0122");
		break;
		case 'asc' :
			$('#'+order_arr[0]+' .iconfont').html("&#Xf0121");
		break;
		
	}
        $("*[ectype='wap_order_by'] a").click(function () {
            replaceParam('order', this.id + " "+((order_arr[1]=='asc')?'desc':'asc'));
            return false;
        });
        
        x = $("#cat_{$cate_id}").offset();
        if($("#cat_{$cate_id}").length>0 && x.left > $(document).width()){
            $(".tab-ul").scrollLeft(x.left-$(document).width()/2.0);
        }
        
    })  
</script>
<section class="new-tab" style="display: ;">
    <ul class="tab-ul">
        <li {if $cate_id == 0} class="cur"{/if}><a href="{url app=search}">{$lang.all}</a></li>
        <!--{foreach from=$header_gcategories.gcategories item=category name=fe_category}-->
        <li id="cat_{$category.id}" {if $cate_id == $category.id} class="cur"{/if}><a href="{url app=search&cate_id=$category.id}">{$category.value|escape}</a></li>
        <!--{/foreach}-->
    </ul>
</section>
<section class="search_goods_options" id="sort_order">
    <ul class="s-items" ectype='wap_order_by'>
        <li><a href="javascript:void(0);" <!--{if $smarty.get.order eq 'sales desc'}-->class="selected" <!--{/if}-->id="sales" >{$lang.sales_desc}<i class="iconfont">&#Xf0122</i><span class="decollator">|</span></a></li>
        <li><a href="javascript:void(0);" id="price">{$lang.price}<i class="iconfont">&#Xf0122</i><span class="decollator">|</span></a></li>
        <li><a href="javascript:void(0);" id="add_time">{$lang.new_product}<i class="iconfont">&#Xf0122</i><span class="decollator">|</span></a></li>
        <li><a href="javascript:void(0);" id="comments">{$lang.goods_comment}<i class="iconfont">&#Xf0122</i><span class="decollator">|</span></a></li>
    </ul>
</section>


<section class="search_goods">
    <!--{if !$goods_list_order}-->
    <ul class="list">

        <!--{foreach from=$goods_list item=goods name=fe_goods}-->
        <a href="{url app=goods&id=$goods.goods_id}">
            <li>
                <img src="{$site_url}/{$goods.default_image}" alt="{$goods.name}"/>
                <div class="detail">
                    <p class="title">{$goods.goods_name|escape}</p>
                    <p class="price">{$goods.price|price}</p>
                </div>
            </li>
        </a>
        <!--{/foreach}-->
    </ul>
    <!--{else}-->
    <div class="null">
        <p>{$lang.no_records}~</p>
    </div>
    <!--{/if}-->
    {include file='page.bottom.html'}
</section>



{include file="footer.html"}